
const data_config = require("./data_config");


module.exports = {

  nav_name: '订单管理', //生成导航菜单
  module_name: 'order_m',  //生成路径，必须与文件名相同
  api: `{
    order_page: cPath + "/admin/shop_order/page", //分页p
    order_detail: cPath + "/admin/shop_order/get", //详情g
    send_goods: cPath + "/admin/shop_order/consignment", //发货p

    ping_tuan_order_page: cPath + "/admin/order/page", //拼团订单列表
    cancel_order: cPath + "/admin/shop_order/cancelAudit", //取消订单的审核，并退款

    
    return_page: commonPath + "/shop_order_return_goods/page", //分页
    return_changeState: commonPath + '/shop_order_return_goods/audit', //状态
    return_detail: cPath + "/shop_order_return_goods/get", //详情

  }`, //接口

  
  //列表
  table66: {
    isGenerate: "false", //false表示不生成页面
    table_name: "return_goods_list",  //表页面名
    nav_name: "退货列表",  //导航名
    tipsText: "退货管理 >> 退货列表", //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    pageApi: "API.order_m.return_page",  //请求api
    // extraPageRequestParams: `
    //   courseId: this.$route.query.id,  //请求
    // `, //已有page和pageSize
    //获取列表页面
    tableData: [
      //普通
      { title: '序号', name: 'index', type: "normal" },
      { title: '商品名', name: 'goodName', type: "normal" },
      {
        title: '商品图片',
        name: 'imgUrl',
        type: "img",
        heightVal: "60",
        widthVal: "100",
      },

      { title: '商品名', name: 'price', type: "normal" },

      { title: '姓名', name: 'linkMan', type: "normal" },
      { title: '手机号', name: 'linkTel', type: "normal" },
      { title: '退货原因', name: 'returnGoodsReason', type: "normal" },

      { title: '审核备注', name: 'remarks', type: "normal" },

      {
        title: '状态',
        name: 'state',
        type: "opts",
        showName: "stateShow",
        showObj: `{
          "1": "通过",
          "2": "拒绝",
          "0": "申请",
        }`
      },

      { title: '修改时间', name: 'updateDate', type: "normal" },

    ],
    tableOpt: [
      {
        type: "view",
        text: "查看",
        request: false,
        jump: "/order_m_return_detail"
      },
      {
        type: "changeState",
        text: "通过",
        request: true,
        url: "API.order_m.return_changeState",
        requestType: 'post',
        params: `{id,  state: 1 }`, //必须为文本 状态 1上架 2下架
        methodNameTag: 'Open', //方法衔接拓展名 changeState Black
        showCondition: `scope.row.state == '0'`,  //展示条件，没有就不传或置为空
      },
      {
        type: "changeState",
        text: "拒绝",
        request: true,
        url: "API.order_m.return_changeState",
        requestType: 'post',
        params: `{id,  state: 2 }`, //必须为文本
        methodNameTag: 'Close', //方法衔接拓展名 changeState Black
        showCondition: `scope.row.state == '0'`,  //展示条件，没有就不传或置为空
      },
    ],
    search: {
      contentArr: {
        input1: { labelName: '姓名', inputName: 'linkMan' },
        input2: { labelName: '手机号', inputName: 'linkTel' },
        input3: { labelName: '订单号', inputName: 'orderNo' },
        select1: {
          labelName: '性别',
          inputName: 'sex',  //输入绑定的变量
          selectOptsName: "sexOpts",
          selectOptsArr: `[
            { value: "0", label: "申请" },
            { value: "1", label: "通过" },
            { value: "2", label: "拒绝" },
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
      },
      //查找按钮的文字
      searchBtn: {
        text: "查询", //链接与table请求接口相同，不做另外配置
      },
      //添加按钮
      // addBtn: {
      //   //搜索栏具有添加功能按钮时，设置此字段
      //   type: "add",
      //   text: "充值",
      //   request: false,
      //   jump: "/charge_m_charge_detail", //添加的跳转按钮
      // }
    },

  },

  //详情页面
  detail_page66: {
    // isGenerate: "false", //false表示不生成页面
    detail_page_name: "return_detail",
    detail_api: "API.order_m.return_detail",
    request_params: `{
      id,
    }`,
    tipsText: "退货管理 >> 退货详情",
    formData: {
      // titleText: "请填写管理员相关信息",

      item1: {
        labelName: "审核人员名称",
        inputName: 'auditorName',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },

      item2: {
        labelName: "商品",
        inputName: 'goodName',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item2_2: {
        labelName: '商品图片',
        inputName: 'imgUrl',
        type: "img",
      },
      item2_3: {
        labelName: "姓名",
        inputName: 'linkMan',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item2_4: {
        labelName: "电话",
        inputName: 'linkTel',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item2_5: {
        labelName: "订单号",
        inputName: 'orderNo',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item2_5_2: {
        labelName: "商品价格",
        inputName: 'price',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item2_6: {
        labelName: "审核备注",
        inputName: 'remarks',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item2_7: {
        labelName: "退货原因",
        inputName: 'returnGoodsReason',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item2_8: {
        labelName: "订单id",
        inputName: 'shopOrderId',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item4: {
        labelName: '状态',
        inputName: 'state',
        type: "opts",
        optShowName: "stateShow",
        optShowStr: `{
          0: "申请",
          1: "通过",
          2: "拒绝"
        }`,
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item3: {
        labelName: "创建时间",
        inputName: 'createDate',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },

    },
  },

  //普消订单列表
  table1: {
    isGenerate: "false", //false表示不生成页面
    table_name: "normal_order_table",  //表页面名
    nav_name: "普消订单列表",  //导航名
    tipsText: "订单管理 >> 普消订单列表", //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    pageApi: "API.order_m.order_page",  //请求api
    extraPageRequestParams: `
      orderType: 2,  //普消
    `, //已有page和pageSize
    //获取列表页面
    tableData: [
        { title: '序号', name: 'index', type: "normal" },
        { title: '订单号', name: 'orderNo', type: "normal" },
        // { title: '用户昵称', name: 'price', type: "normal" }, 
        { title: '商品数量', name: 'goodNum', type: "normal" }, 
        { title: '订单总金额', name: 'orderAmount', type: "normal" }, 
        { title: '收货人', name: 'linkMan', type: "normal" },  
   
        { 
          title: '订单类型', 
          name: 'orderType', 
          type: "opts",
          showName: "orderTypeShow",
          showObj: `{
            "1": "易物",
            "2": "普消",
          }` 
        },
        { 
          title: '订单取消', 
          name: 'cancelState', 
          type: "opts", 
          showName: "cancelStateShow",
          showObj: `{
            "0": "正常",
            "1": "用户申请取消",
            "2": "拒绝取消",
            "3": "同意取消",
          }` 
        },
        { 
          title: '状态', 
          name: 'orderState', 
          type: "opts", 
          showName: "orderStateShow",
          showObj: `{
            "0": "已取消",
            "1": "待支付",
            "2": "待发货",
            "3": "待收货",
            "4": "已完成",
          }` 
        },
        { title: '下单时间', name: 'gmtCreated', type: "normal" }, 
    ],
    tableOpt: [
       {
        type: "view",
        text: "查看",
        request: false,
        jump: "/order_m_order_detail",
      },
      {
        type: "changeState",
        text: "同意取消",
        request: true,
        url: "API.order_m.cancel_order",
        requestType: 'post',
        params: `{id,  cancelState: 3 }`, //必须为文本 状态 1上架 2下架
        methodNameTag: 'Open', //方法衔接拓展名 changeState Black
        showCondition: `scope.row.cancelState == '1'`,  //展示条件，没有就不传或置为空
      },
      {
        type: "changeState",
        text: "拒绝取消",
        request: true,
        url: "API.order_m.cancel_order",
        requestType: 'post',
        params: `{id,  cancelState: 2 }`, //必须为文本
        methodNameTag: 'Close', //方法衔接拓展名 changeState Black
        showCondition: `scope.row.cancelState == '1'`,  //展示条件，没有就不传或置为空
      },
    ],
    search: {
      contentArr: {
        input1: { labelName: '订单号', inputName: 'orderNo' },
        input2: { labelName: '姓名', inputName: 'realName' },
        select1: {
          labelName: '订单状态',
          inputName: 'orderState',  //输入绑定的变量
          selectOptsName: "orderStateOpts",
          selectOptsArr: `[
            { value: "0", label: "已取消" },
            { value: "1", label: "待支付" },
            { value: "2", label: "待发货" },
            { value: "3", label: "待收货" },
            { value: "4", label: "已完成" },
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
        select2: {
          labelName: '取消状态',
          inputName: 'cancelState',  //输入绑定的变量
          selectOptsName: "cancelStateOpts",
          selectOptsArr: `[
            { value: "0", label: "未取消" },
            { value: "1", label: "用户申请取消" },
            { value: "2", label: "拒绝取消" },
            { value: "3", label: "同意取消" },
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
        date1: {
          labelName: '起止时间',
          inputName: 'oTime',
          dateConfig: {
            startDateName: 'oStartDate',
            endDateName: 'oEndDate',
            dateChangeMethodsName: 'handleDateChange'
          }
        },
      },
      //查找按钮的文字
      searchBtn: {
        text: "查询", //链接与table请求接口相同，不做另外配置
        extraParams: `
          orderType: 2,  //普消 
        `,
      },
      // //添加按钮
      // addBtn: {
      //   //搜索栏具有添加功能按钮时，设置此字段
      //   type: "add",
      //   text: "发布拼团",
      //   request: false,
      //   jump: "/order_m_order_detail", //添加的跳转按钮
      // }
    },    
  },

   //易物订单列表
   table12: {
    isGenerate: "false", //false表示不生成页面
    table_name: "exchange_order_table",  //表页面名
    nav_name: "易物订单列表",  //导航名
    tipsText: "订单管理 >> 易物订单列表", //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    pageApi: "API.order_m.order_page",  //请求api
    extraPageRequestParams: `
      orderType: 1,  //易物
    `, //已有page和pageSize
    //获取列表页面
    tableData: [
        { title: '序号', name: 'index', type: "normal" },
        { title: '订单号', name: 'orderNo', type: "normal" },
        { title: '商家id', name: 'merchantId', type: "normal" },  
        // { title: '用户昵称', name: 'price', type: "normal" }, 
        { title: '商品数量', name: 'goodNum', type: "normal" }, 
        { title: '订单总金额', name: 'orderAmount', type: "normal" }, 
        { title: '收货人', name: 'linkMan', type: "normal" },  
        { 
          title: '类型', 
          name: 'type', 
          type: "opts", 
          showName: "typeShow",
          showObj: `{
            "1": "总订单",
            "2": "子订单",
          }` 
        },
        { 
          title: '订单取消', 
          name: 'cancelState', 
          type: "opts", 
          showName: "cancelStateShow",
          showObj: `{
            "0": "正常",
            "1": "用户申请取消",
            "2": "拒绝取消",
            "3": "同意取消",
          }` 
        },
        { 
          title: '状态', 
          name: 'orderState', 
          type: "opts", 
          showName: "orderStateShow",
          showObj: `{
            "0": "已取消",
            "1": "待支付",
            "2": "待发货",
            "3": "待收货",
            "4": "已完成",
          }` 
        },
        { title: '下单时间', name: 'gmtCreated', type: "normal" }, 
    ],
    tableOpt: [
       {
        type: "view",
        text: "查看",
        request: false,
        jump: "/order_m_order_detail",
      },
      {
        type: "changeState",
        text: "同意取消",
        request: true,
        url: "API.order_m.cancel_order",
        requestType: 'post',
        params: `{id,  cancelState: 3 }`, //必须为文本 状态 1上架 2下架
        methodNameTag: 'Open', //方法衔接拓展名 changeState Black
        showCondition: `scope.row.cancelState == '1'`,  //展示条件，没有就不传或置为空
      },
      {
        type: "changeState",
        text: "拒绝取消",
        request: true,
        url: "API.order_m.cancel_order",
        requestType: 'post',
        params: `{id,  cancelState: 2 }`, //必须为文本
        methodNameTag: 'Close', //方法衔接拓展名 changeState Black
        showCondition: `scope.row.cancelState == '1'`,  //展示条件，没有就不传或置为空
      },
    ],
    search: {
      contentArr: {
        input1: { labelName: '订单号', inputName: 'orderNo' },
        input2: { labelName: '姓名', inputName: 'realName' },
        select1: {
          labelName: '订单状态',
          inputName: 'orderState',  //输入绑定的变量
          selectOptsName: "orderStateOpts",
          selectOptsArr: `[
            { value: "0", label: "已取消" },
            { value: "1", label: "待支付" },
            { value: "2", label: "待发货" },
            { value: "3", label: "待收货" },
            { value: "4", label: "已完成" },
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
        select2: {
          labelName: '取消状态',
          inputName: 'cancelState',  //输入绑定的变量
          selectOptsName: "cancelStateOpts",
          selectOptsArr: `[
            { value: "0", label: "未取消" },
            { value: "1", label: "用户申请取消" },
            { value: "2", label: "拒绝取消" },
            { value: "3", label: "同意取消" },
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
        // select2: {
        //   labelName: '订单类型',
        //   inputName: 'orderType',  //输入绑定的变量
        //   selectOptsName: "orderTypeOpts",
        //   selectOptsArr: `[
        //     { value: "1", label: "易物" },
        //     { value: "2", label: "普消" },
        //     { value: "", label: "请选择" },
        //   ],
        //   `, //选项数组
        // },
        date1: {
          labelName: '起止时间',
          inputName: 'oTime',
          dateConfig: {
            startDateName: 'oStartDate',
            endDateName: 'oEndDate',
            dateChangeMethodsName: 'handleDateChange'
          }
        },
      },
      //查找按钮的文字
      searchBtn: {
        text: "查询", //链接与table请求接口相同，不做另外配置
        extraParams: `
          orderType: 1,  //易物 
        `,
      },
      // //添加按钮
      // addBtn: {
      //   //搜索栏具有添加功能按钮时，设置此字段
      //   type: "add",
      //   text: "发布拼团",
      //   request: false,
      //   jump: "/order_m_order_detail", //添加的跳转按钮
      // }
    },    
  },

  
  //详情页面
  detail_page1: {
    isGenerate: "false", //false表示不生成页面
    detail_page_name: "order_detail",
    detail_api: "API.order_m.order_detail",
    request_params: `{
        id,
      }`,
    tipsText: "订单管理 >> ",
    formData: {
     
    },
  },

  //待发货订单列表 使用自定义页面
  table2_1: {
    isGenerate: "false", //false表示不生成页面
    table_name: "wait_send_order_table_puxiao",  //表页面名
    nav_name: "待发货订单列表",  //导航名
    tipsText: "订单管理 >> 待发货订单列表", //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    pageApi: "API.ping_tuan_m.page",  //请求api
    extraPageRequestParams: `
      orderState: 2,  //待发货
    `, //已有page和pageSize
    //获取列表页面
    tableData: [
      
    ],
    tableOpt: [
     
    ],
    search: {
      contentArr: {
        
      },
      //查找按钮的文字
      searchBtn: {
        text: "查询", //链接与table请求接口相同，不做另外配置
      },
      //添加按钮
      // addBtn: {
      //   //搜索栏具有添加功能按钮时，设置此字段
      //   type: "add",
      //   text: "发布拼团",
      //   request: false,
      //   jump: "/order_m_order_detail", //添加的跳转按钮
      // }
    },    
  },


  
  //待发货订单列表 使用自定义页面
  table2_2: {
    isGenerate: "false", //false表示不生成页面
    table_name: "wait_send_order_table_yiwu",  //表页面名
    nav_name: "待发货订单列表",  //导航名
    tipsText: "订单管理 >> 待发货订单列表", //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    pageApi: "API.ping_tuan_m.page",  //请求api
    extraPageRequestParams: `
      orderState: 2,  //待发货
    `, //已有page和pageSize
    //获取列表页面
    tableData: [
      
    ],
    tableOpt: [
     
    ],
    search: {
      contentArr: {
        
      },
      //查找按钮的文字
      searchBtn: {
        text: "查询", //链接与table请求接口相同，不做另外配置
      },
      //添加按钮
      // addBtn: {
      //   //搜索栏具有添加功能按钮时，设置此字段
      //   type: "add",
      //   text: "发布拼团",
      //   request: false,
      //   jump: "/order_m_order_detail", //添加的跳转按钮
      // }
    },    
  },



  
  //拼团订单
  table3: {
    isGenerate: "false", //false表示不生成页面
    table_name: "ping_tuan_order_table",  //表页面名
    nav_name: "拼团订单列表",  //导航名
    tipsText: "订单管理 >> 拼团订单列表", //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    pageApi: "API.ping_tuan_m.ping_tuan_order_page",  //请求api
    // extraPageRequestParams: `
    //   orderState: 2,  //待发货
    // `, //已有page和pageSize
    //获取列表页面
    tableData: [
      // { title: '序号', name: 'index', type: "normal" },
      // { title: '编号', name: 'parentOrderNo', type: "normal" },
      // { title: '商品名', name: 'merchantId', type: "normal" },  
      // { title: '用户昵称', name: 'price', type: "normal" }, 
      // { title: '拼团金额', name: 'goodNum', type: "normal" }, 
      // { 
      //   title: '状态', 
      //   name: 'type', 
      //   type: "opts", 
      //   showName: "typeShow",
      //   showObj: `{
      //     "1": "总订单",
      //     "2": "子订单",
      //   }` 
      // },
      // { title: '开团时间', name: 'price', type: "normal" }, 
    ],
    tableOpt: [
      // {
      //   type: "view",
      //   text: "查看",
      //   request: false,
      //   jump: "/order_m_order_detail",
      // },
    ],
    search: {
      contentArr: {
        // input1: { labelName: '账号名', inputName: 'tel' },
        // date1: {
        //   labelName: '注册时间',
        //   inputName: 'registerTime',
        //   dateConfig: {
        //     startDateName: 'registerStartDate',
        //     endDateName: 'registerEndDate',
        //     dateChangeMethodsName: 'handleRegisterDateChange'
        //   }
        // },
      },
      // //查找按钮的文字
      // searchBtn: {
      //   text: "查询", //链接与table请求接口相同，不做另外配置
      // },
      // //添加按钮
      // addBtn: {
      //   //搜索栏具有添加功能按钮时，设置此字段
      //   type: "add",
      //   text: "发布拼团",
      //   request: false,
      //   jump: "/order_m_order_detail", //添加的跳转按钮
      // }
    },
  },


  //取消订单列表
  table4: {
    //isGenerate: "false", //false表示不生成页面
    table_name: "cancel_order_table",  //表页面名
    nav_name: "取消订单列表",  //导航名
    tipsText: "订单管理 >> 取消订单列表", //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    pageApi: "API.order_m.order_page",  //请求api
    extraPageRequestParams: `
        cancelState: 1,    //用户申请取消
    `, //已有page和pageSize
    //获取列表页面
    tableData: [
        { title: '序号', name: 'index', type: "normal" },
        { title: '订单号', name: 'orderNo', type: "normal" },
        // { title: '用户昵称', name: 'price', type: "normal" }, 
        { title: '商品数量', name: 'goodNum', type: "normal" }, 
        { title: '订单总金额', name: 'orderAmount', type: "normal" }, 
        { title: '收货人', name: 'linkMan', type: "normal" },  
        { 
          title: '订单类型', 
          name: 'orderType', 
          type: "opts",
          showName: "orderTypeShow",
          showObj: `{
            "1": "易物",
            "2": "普销",
          }` 
        },
        { 
          title: '订单取消', 
          name: 'cancelState', 
          type: "opts", 
          showName: "cancelStateShow",
          showObj: `{
            "0": "正常",
            "1": "用户申请取消",
            "2": "拒绝取消",
            "3": "同意取消",
          }` 
        },
        { 
          title: '状态', 
          name: 'orderState', 
          type: "opts", 
          showName: "orderStateShow",
          showObj: `{
            "0": "已取消",
            "1": "待支付",
            "2": "待发货",
            "3": "待收货",
            "4": "已完成",
          }` 
        },
        { title: '下单时间', name: 'gmtCreated', type: "normal" }, 
    ],
    tableOpt: [
       {
        type: "view",
        text: "查看",
        request: false,
        jump: "/order_m_order_detail",
      },
      {
        type: "changeState",
        text: "同意取消",
        request: true,
        url: "API.order_m.cancel_order",
        requestType: 'post',
        params: `{id,  cancelState: 3 }`, //必须为文本 状态 1上架 2下架
        methodNameTag: 'Open', //方法衔接拓展名 changeState Black
        showCondition: `scope.row.cancelState == '1'`,  //展示条件，没有就不传或置为空
      },
      {
        type: "changeState",
        text: "拒绝取消",
        request: true,
        url: "API.order_m.cancel_order",
        requestType: 'post',
        params: `{id,  cancelState: 2 }`, //必须为文本
        methodNameTag: 'Close', //方法衔接拓展名 changeState Black
        showCondition: `scope.row.cancelState == '1'`,  //展示条件，没有就不传或置为空
      },
    ],
    search: {
      contentArr: {
        input1: { labelName: '订单号', inputName: 'orderNo' },
        input2: { labelName: '姓名', inputName: 'realName' },
        select1: {
          labelName: '订单状态',
          inputName: 'orderState',  //输入绑定的变量
          selectOptsName: "orderStateOpts",
          selectOptsArr: `[
            { value: "0", label: "已取消" },
            { value: "1", label: "待支付" },
            { value: "2", label: "待发货" },
            { value: "3", label: "待收货" },
            { value: "4", label: "已完成" },
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
        // select2: {
        //   labelName: '取消状态',
        //   inputName: 'cancelState',  //输入绑定的变量
        //   selectOptsName: "cancelStateOpts",
        //   selectOptsArr: `[
        //     { value: "0", label: "未取消" },
        //     { value: "1", label: "用户申请取消" },
        //     { value: "2", label: "拒绝取消" },
        //     { value: "3", label: "同意取消" },
        //     { value: "", label: "请选择" },
        //   ],
        //   `, //选项数组
        // },
        date1: {
            labelName: '起止时间',
            inputName: 'oTime',
            dateConfig: {
                startDateName: 'oStartDate',
                endDateName: 'oEndDate',
                dateChangeMethodsName: 'handleDateChange'
            }
        },
      },
      //查找按钮的文字
      searchBtn: {
        text: "查询", //链接与table请求接口相同，不做另外配置
        extraParams: `
            cancelState: 1,    //用户申请取消
        `,
      },
      // //添加按钮
      // addBtn: {
      //   //搜索栏具有添加功能按钮时，设置此字段
      //   type: "add",
      //   text: "发布拼团",
      //   request: false,
      //   jump: "/order_m_order_detail", //添加的跳转按钮
      // }
    },    
  },





 
}

